<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
  </style>
</head>
<body>
</body>
<script>
// let obj = [1,2,3,4,5,6,7,8]
// let newobj = new Proxy(obj,{
//     get(target,key){
//         console.log("你在获取值",target,key,Reflect.get(target));
//         return Reflect.get(target,key);
//     },
//     set(){
//         console.log("你在设置值");
//     }
// });
// console.log(newobj.data.push());
let list = []
const listProxy = new Proxy(list, {
    set(target, property, value) {
        console.log('set',target, property, value) //property指下标 value值
        target[property] = value
        return true //表示设置成功
    }
})




</script>
</html>